#!/usr/bin/env bash

cmd="daminghu-cli-server-linux"
param="yasenagat"
file_nohup="daminghu-cli-server.log"

ps -ef|grep ${cmd} |grep ${param} |awk '{print $2}'|xargs kill -9
sleep 2s

echo "${cmd} stop ok"

nohup ./${cmd} ${param}>> ${file_nohup} &

sleep 1s
echo "${cmd} start ok"